package com.siemens.industrial.model.partner;

import org.springframework.jdbc.core.RowMapper;

/**
 * Created by qupen on 2016/9/18.
 */
public class DeviceEventRelation {
    private String subscription;
    private String eventId;
    private String email;
    private int type;

    private static final RowMapper<DeviceEventRelation> rowMapper = (resultSet, i) -> {
        DeviceEventRelation deviceEventRelation = new DeviceEventRelation();
        deviceEventRelation.setSubscription(resultSet.getString("subscription"));
        deviceEventRelation.setEventId(resultSet.getString("event_id"));
        deviceEventRelation.setEmail(resultSet.getString("email"));
        deviceEventRelation.setType(resultSet.getInt("type"));
        return deviceEventRelation;
    };

    public static RowMapper<DeviceEventRelation> getRowMapper() {
        return rowMapper;
    }

    //<editor-fold desc="getters and setters">


    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSubscription() {
        return subscription;
    }

    public void setSubscription(String subscription) {
        this.subscription = subscription;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    //</editor-fold>
}
